package com.example.supplierfinancin;

import com.google.gson.Gson;
import com.google.gson.JsonObject;

import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;

public class test {
    public static void main(String[] args) {
        List<Receipt> temp=new ArrayList<>();
        Receipt t=new Receipt("adsf","asdf",new BigInteger("1"),new BigInteger("2"),new BigInteger("3"));
        Receipt k=new Receipt("adsf","asdf",new BigInteger("1"),new BigInteger("2"),new BigInteger("3"));
        temp.add(t);
        temp.add(k);
        Gson gson=new Gson();
        JsonObject jsonObject=new JsonObject();
        jsonObject.addProperty("status",gson.toJson(temp));
        System.out.println(gson.toJson(temp));
        System.out.println(new String("123"));
//        String s=jsonObject.toString();
//        jsonObject=gson.fromJson(s,JsonObject.class);
//        List<Receipt> ll=gson.fromJson(jsonObject.get("status"),List);
//        System.out.println(jsonObject.get("status"));
//       // System.out.println(jsonObject.toString());
    }
}
